<?php

//设置全局错误警告级别
$GLOBALS['settings']['debug'] == true ? error_reporting(E_ALL || ~E_NOTICE) : error_reporting(0);

if($GLOBALS['settings']['debug']){
   $GLOBALS['settings']['startTime'] =  getMillisecond();
}

//开启跨域设置
if($GLOBALS['settings']['isAccessControlAllowOrigin']){
   header('Access-Control-Allow-Origin: *');
   header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
   header('Access-Control-Allow-Methods: GET, POST, PUT,DELETE');
}